<template>
	<view class="lwh">
		<image class="bg" src="../../../static/images/lwh.png"></image>
		<view class="time">{{pageObj.time}}</view>
	</view>
</template>

<script>
	import { getDate } from '@/common/tools.js';
	
	export default {
		data() {
			return {
				pageObj: {
					time: ''
				}
			}
		},
		onLoad() {
			this.getTime();
		},
		methods: {
			getTime() {
				const { year, month, day, hour, minute, second } = getDate();
				this.pageObj['time'] = year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second;
				setTimeout(() =>{
					this.getTime();
				}, 1000);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.lwh{
		.bg{
			width: 100vw;
			height: 100vh;
		}
		.time{
			position: absolute;
			z-index: 1;
			top: 30rpx;
			left: 50%;
			margin-left: -300rpx;
			width: 600rpx;
			height: 80rpx;
			line-height: 80rpx;
			font-size: 48rpx;
			font-weight: bold;
			color: #FFF;
			text-align: center;
			// background-color: red;
			// opacity: 0.1;
		}
	}
</style>
